@extends('admin.public.base')

@section('title', '添加货品')

@section('content')


    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> <a href="/admin/goods">产品管理</a> <span
                class="c-gray en">&gt;</span> 添加货品 <a class="btn btn-success radius r"
                                                      style="line-height:1.6em;margin-top:3px"
                                                      href="javascript:location.replace(location.href);" title="刷新"><i
                    class="Hui-iconfont">&#xe68f;</i></a>
    </nav>

    @if(session('status'))
        <script>
            setTimeout(() => {
                layer.msg("{{session('status')}}");
            }, 100)
        </script>
    @endif


    <div class="Hui-article">
        <article class="cl pd-20">
            <div class="panel panel-warning">
                <!-- Default panel contents -->
                <div class="panel-heading">货品列表 （{{$goods['title']}}）</div>
                <table class="table table-border table-bordered table-bg table-hover table-sort">
                    <thead>
                    <tr>
                        <th>规格</th>
                        <th>库存</th>
                        <th>操作</th>
                    </tr>
                    </thead>

                    <tbody>
                    @foreach($lists as $list)
                        <tr>
                            <th>{{$list['lists']}}</th>
                            <th>{{$list['stock']}}</th>
                            <th><a href="/admin/goodslistdel/{{$list['id']}}">删除</a></th>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>


            <div class="page-container">
                <div class="panel-heading">添加货品</div>
                <form action="" method="post" class="form form-horizontal" id="form-article-add">
                    @csrf
                    <div class="row cl">
                        <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>货品规格：</label>
                        <div class="formControls col-xs-8 col-sm-9">
                            <input type="text" class="input-text" value="" placeholder="格式（红色XL）" id="" name="lists">
                        </div>
                    </div>
                    <div class="row cl">
                        <label class="form-label col-xs-4 col-sm-2">库存：</label>
                        <div class="formControls col-xs-8 col-sm-9">
                            <input type="text" class="input-text" value="" placeholder="库存" id="" name="stock">
                        </div>
                    </div>
                    <div class="row cl">
                        <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                            <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i>
                                保存并提交
                            </button>
                            <button onClick="history.back();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
                        </div>
                    </div>
                </form>
            </div>
        </article>
    </div>

@endsection
